//Outdoor Script for x = 0  y = 0

beginoutdoorscript;

variables;

int choice;

body;

beginstate INIT_STATE;
break;

beginstate START_STATE;
break;

beginstate 10;
	reset_dialog();
	add_dialog_str(0,"This is the border of Riverrod. Through here you can leave and try continue your travelling. But do you really want to do that?",0);
	add_dialog_str(1,"If you have deposited any money in the Banka Riverrod, you must first go back to Voughton and get your money back, as you won't get it back when leaving the scenario!",0);
	add_dialog_choice(0,"Not yet.");
	add_dialog_choice(1,"I'd like to leave now.");
	choice = run_dialog(1);
	
	if (get_flag(5,12) == 0) {
			if (choice == 1) {
					message_dialog("That is good news for Riverrod. Many people will thank you for this stay.","");
					block_entry(1);
					}
				if (choice == 2) {
						message_dialog("The people here will have to find somebody else to clean up their mess. That is, if this mess was really made by themselves. In any case, they are disappointed you have to leave already.","You wave this province goodbye, hoping never to return.");
						end_scenario(0);
						}
				}
	
	if (get_flag(5,12) == 1) {
			if (choice == 1) {
					message_dialog("Riverrod is pleased that you decided to stay longer. People honor you, and a celebrity in their midst is always pleasant.","");
					block_entry(1);
					}
				if (choice == 2) {
						message_dialog("You have saved the province, saved many lives. Riverrod wouldn't have existed much longer without your help. Mayor Ruth gave you a healthy amount of cash and you have the good feeling of having done a good deed.","While you walk through the border gates, a tear drops on the ground. This province is filled with memories, filled with pain, suffering and death. You are pleased that you can leave it.");
						message_dialog("In the next years, trade will start to flourish once again and people will return to their homes. You just hope that this province will really survive until that time. It is a beautiful place.","This is the end of Thralni, the man who loved his province so much that he was prepared to kill it to get it back; to riddle it with enemies, to see it lie in front of his castle once again.");
						message_dialog("THE END","");
						end_scenario(1);
						}
				}
break;

beginstate 11;
if (get_flag(100,0) == 1)
		end();
	message_dialog("Here was a camp not long ago. The fire is still lit, as if the inhabitants flew with haste. You see blood and fur lying around. You wonder.","");
	set_flag(100,0,1);
break;

beginstate 12;
if (get_flag(100,1) == 1)
		end();
	message_dialog("From you here you have a nice view on the place where the rivers meet. You stand there for a while, looking at the waterfalls, that carry the water from Riverrod the the neighbouring province.","");
	set_flag(100,1,1);
break;

beginstate 13;
if (get_flag(39,0) == 0)
		block_entry(1);
	if (get_flag(100,2) == 1);
			end();	
		message_dialog("After reading that book, you suddenly notice the crack in the cliff wall. you step through it.","");
		set_flag(100,2,1);
break;

beginstate 14;
if (get_flag(18,1) == 1 && get_flag(100,3) == 0) {
		message_dialog("The guards you come across are very alert, and they look at you suspiciously. When you greet them, they draw their weapons. You don't. Eventually they see you are no bad guys, and leave you.","The attack on the Empire HQ certainly stirred up the security here.");
		outdoor_enc_result(1);
		set_flag(100,3,1);
		end();
		}

if (get_flag(5,12) == 0 && get_flag(100,4) == 0) {
		message_dialog("You run across a small patrol of guards. They ask you to come closer to them.","_Their leader leans forward to you. _Let me give you some advice. Riverrod province is under attack. It is not wise to just move around like this. Go to safety, which is in the neighbouring province._ After that, the soldiers leave you.");
    	outdoor_enc_result(1);
	set_flag(100,4,1);
    	end();
    	}

if (get_flag(5,12) != 0 && get_flag(100,5) == 0) {
    	message_dialog("You pass these guards. They are very friendly, and greet you with pleasure. You wave and smile back. Both of you continue on your journey after having a small chat.","");
		outdoor_enc_result(1);
		set_flag(100,5,1);
		end();
		}
outdoor_enc_result(1);
break;